<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:template match="control[@name='used']">
		<xsl:for-each select="input">
			<input><xsl:copy-of select="@*"/></input>
			<xsl:value-of select="text()"/>
		</xsl:for-each>
	</xsl:template>

	<xsl:template name="general_part">
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td colspan="3" class="titleblack" align="center">
					<font class="titlesection"><strong><font color="{$color_main_first1}">General Preferences</font></strong></font>
					<hr width="90%" size="1" noshade="true" color="{$header_bg}"/>
				</td>
			</tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr><td class="titleblack" align="center"><nobr><xsl:apply-templates select="control[@name='used']"/></nobr></td></tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td class="titleblack" align="right"><xsl:apply-templates select="control[@name='FM']"/></td>
				<td class="titleblack" align="right" valign="bottom">LOA</td>
				<td class="smalltitle" align="right" valign="bottom">from<br/><xsl:apply-templates select="control[@name='FootageMin']/input"/></td>
				<td class="smalltitle" valign="bottom">to<br/><xsl:apply-templates select="control[@name='FootageMax']/input"/></td>
			</tr>
			<tr>
				<td class="titleblack" align="right"><xsl:apply-templates select="control[@name='Currency']"/></td>
				<td class="titleblack" align="right" valign="bottom">&#160;&#160;Price</td>
				<td class="smalltitle" align="right" valign="bottom">from<br/><xsl:apply-templates select="control[@name='PriceMin']/input"/></td>
				<td class="smalltitle" valign="bottom">to<br/><xsl:apply-templates select="control[@name='PriceMax']/input"/></td>
			</tr>
			<tr>
				<td class="titleblack">&#160;</td>
				<td class="titleblack" align="right" valign="bottom">&#160;&#160;Year</td>
				<td class="smalltitle" align="right" valign="bottom">from<br/><xsl:apply-templates select="control[@name='YearMin']/input"/></td>
				<td class="smalltitle" valign="bottom">to<br/><xsl:apply-templates select="control[@name='YearMax']/input"/></td>
			</tr>
			<tr>
				<td class="titleblack">&#160;</td>
				<td class="titleblack" valign="bottom" align="right">Builder</td>
				<td class="titleblack" align="center" colspan="2"><xsl:apply-templates select="control[@name='Manufacturer']/input"/><br/></td>
				<td class="titleblack"></td>
			</tr>
			<tr>
				<td class="titleblack">&#160;</td>
				<td class="titleblack">&#160;&#160;&#160;&#160;&#160;&#160;&#160;</td>
				<td class="smalltitle" colspan="2">&#160;&#160;&#160;&#160;to select multiple Builders<br/>&#160;&#160;&#160;&#160;separate using commas</td>
				<td class="titleblack"></td>
			</tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr><td class="titleblack" align="center"><xsl:call-template name="motor_sail"/></td></tr>
		</table>
	</xsl:template>

	<xsl:template name="display_part">
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td colspan="3" class="titleblack" align="center">
					<font class="titlesection"><strong><font color="{$color_main_first1}">Display Preferences</font></strong></font>
					<hr width="90%" size="1" noshade="true" color="#CCCCCC"/>
				</td>
			</tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td>
					<table cellpadding="2" cellspacing="2" width="100%">
						<tr>
							<td class="titleblack" align="center"><xsl:apply-templates select="control[@name='LPP']"/></td>
							<td class="titleblack" align="center"><xsl:apply-templates select="control[@name='Photos']"/></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="location_part">
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td colspan="3" class="titleblack" align="center">
					<font class="titlesection"><strong><font color="{$color_main_first1}">Location Preferences</font></strong></font>
					<hr width="90%" size="1" noshade="true" color="#CCCCCC"/>
				</td>
			</tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td>
					<table cellpadding="2" cellspacing="2" width="100%">
						<tr>
							<td class="titleblack" align="left" valign="top"><xsl:apply-templates select="control[@name='State']"/></td>
							<td class="titleblack" align="left" valign="top"><xsl:apply-templates select="control[@name='Country']"/></td>
							<td class="titleblack" align="left" valign="top"><xsl:apply-templates select="control[@name='Region']"/></td>
						</tr>
					</table>
					<!--<table cellpadding="2" cellspacing="2" width="100%" border="0">
						<tr>
							<td class="titleblack" align="center"><xsl:apply-templates select="control[@name='Region']"/></td>
						</tr>
					</table>-->
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="sort_part">
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td colspan="3" class="titleblack" align="center">
					<font class="titlesection"><strong><font color="{$color_main_first1}">Sort Preferences</font></strong></font>
					<hr width="90%" size="1" noshade="true" color="#CCCCCC"/>
				</td>
			</tr>
		</table>
		<table cellpadding="2" cellspacing="2" width="100%">
			<tr>
				<td class="titleblack" align="right"><xsl:apply-templates select="control[@name='Sort1']"/></td>
				<td class="titleblack" align="left" valign="bottom"><xsl:apply-templates select="control[@name='AD1']"/></td>
				<td class="titleblack" align="right"><xsl:apply-templates select="control[@name='Sort2']"/></td>
				<td class="titleblack" align="left" valign="bottom"><xsl:apply-templates select="control[@name='AD2']"/></td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template match="control[@name='used']">
		<xsl:for-each select="input">
			<input><xsl:copy-of select="@*"/></input>
			<xsl:value-of select="text()"/>
		</xsl:for-each>
	</xsl:template>

	<xsl:template name="motor_sail">
		<table cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td bgcolor="#CCCCCC">
					<table cellpadding="10" cellspacing="1" width="100%">
						<tr valign="top" bgcolor="{$bgcolor}">
							<td align="center">
								<table cellpadding="0" cellspacing="0">
									<tr>
										<td class="titleblack" align="center"><xsl:apply-templates select="control[@name='VesselType']/input[@value=2]"/><br/><br/></td>
									</tr>
									<tr valign="top">
										<td class="titleblack"><xsl:apply-templates select="control[@name='CategoryType']"/></td>
									</tr>
								</table>
							</td>
							<td align="center">
								<table cellpadding="0" cellspacing="0">
									<tr>
										<td class="titleblack" align="center"><xsl:apply-templates select="control[@name='VesselType']/input[@value=1]"/><br/><br/></td>
									</tr>
									<tr>
										<td class="titleblack"><xsl:apply-templates select="control[@name='Category']"/><br/></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</xsl:template>

</xsl:stylesheet>
